#ifndef __ENEMY__
#define __ENEMY__
/*
* enemy.h
*/
#include <vector>

#include "animated_sprite.h"
#include "character.h"

using std::vector;

extern vector<Entity *>entVec;

/*! \brief Enemy Class.
*
*/
class Enemy : public AnimatedSprite {
  public:
    /*! \brief Class constructor.
    *
    * \param player is the pointer to the playable character.
    * \param pack is the AnimatedSprite container to share
    * \param type Generate the Enemy's AI (see consts.h)
    */
    Enemy(Character * player, AnimatedSprite * pack, int type = TYPE_RANGED);
    /*! \brief Update the enemy.
    *
    * Update its animation, movements, and such.
    */
    int __update();
    /*! \brief Hit the enemy.
    *
    * \param damage is the amount of damage dealt.
    */
    void __hit(int damage);
    /*! \brief Get the Enemy status.
    *
    * \return 1 if alive, 0 if not.
    */
    int __isAlive();
    /*! \brief Spread a bullet.
    *
    * \param side (use either VIEW_RIGHT or VIEW_LEFT)
    */
    void __shoot(int side = 0);
    /*! \brief Set the life of the unit.
    * \param val integer
    */
    void __setLife(int val);

    /** 
    * Life HUD
    */
    HUD * _HUDLife;

  private:
    int _life, _maxLife;
    int _type;
    int _minrange;
    int _view;
    Character * _player;

    // IA
    int _stamina[2];
    int _restTime[2];
    int _shootFrequency[2];
    

};
#endif
